﻿using Xejen.Communication.Socket.Extensions;
using Xejen.Hosting;
using Xejen.Logger;
using Xejen.Logger.NLog;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Xejen.Communication.Event.Demos
{
    static class Program
    {
        static void Main(string[] args)
        {
            ILoggerManager loggerManager = NLogManager.Instance();
            ConsoleAppHost host = new ConsoleAppHost(new HostConfiguration { }, loggerManager);

            #region 构建Socket通讯
            host
                .UseSocketCommunication((builder) =>
                {
                    builder.ConfigureSocketConfiguration((config) => { }).AddCommunicator();
                })
                .Build();
            #endregion

            host.Run();
        }
    }
}
